package com.tdd.api.server.domain.param;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;


@Data
public class BasePageParam{
    /**
     * 当前页从1开始
     */
    @NotNull(message = "当前页码不能为空")
    @ApiModelProperty(value = "当前页",required = true,example ="1" )
    private Integer pageNum = 1;
    /**
     * 每页数据条数
     */
    @NotNull(message = "每页数据条数不能为空")
    @ApiModelProperty(value = "每页条数",required = true,example ="10" )
    private Integer pageSize = 10;


    /**
     * 自定义分页需要
     * 系统自动计算
     */
    @ApiModelProperty(hidden = true)
    private Integer offset = (pageNum-1)*pageSize;



}
